package com.atguigu.service.impl;

import com.atguigu.dao.OrderItemDao;
import com.atguigu.dao.impl.OrderItemDaoImpl;
import com.atguigu.domain.OrderItem;
import com.atguigu.service.OrderItemService;

import java.util.List;

/**
 * @author dl
 * @date 2020/5/4 15:27
 */
public class OrderItemServiceImpl implements OrderItemService {

    private OrderItemDao orderItemDao = new OrderItemDaoImpl();

    @Override
    public List<OrderItem> listOrderItems(String orderId) {
        return orderItemDao.listOrderItems(orderId);
    }

    @Override
    public void saveOrderItem(List<OrderItem> list) {
        orderItemDao.batchOrderItem(list);
    }
}
